<?php

use yii\helpers\Html;
use yii\widgets\DetailView;


$this->title = '认领单详情';
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Income Claims'), 'url' => ['index','income_id'=>$model->income_id]];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="income-claim-view">

  
    <div class="box">
        <div class="box-header">
         <?= Html::a(Yii::t('app', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
        </div>
        <div class="box-body">

        <?= DetailView::widget([
            'model' => $model,
            'attributes' => [
                 'code',
                'product.code',
                'product.name',
                'income.code',
                [
                    'attribute' => 'currency',
                    'value' => function ($model) {
                            return isset(Yii::$app->params['currency_type'][$model->currency])?Yii::$app->params['currency_type'][$model->currency]:'';
                        },
                ],
                'income.price',
                'price',
                'pro_price',
                'rate',
                 [
                    'attribute' => 'status',
                    'value' => function ($model) {
                            return isset(Yii::$app->params['claim_status'][$model->status])?Yii::$app->params['claim_status'][$model->status]:'';
                        },
                ],
                'remark',
                [
                      'attribute' => 'user_id',
                      'value' => function($model){

                            return isset($model->user) ? $model->user->name : '管理员';
                      }
                ],

                'created_at',
                'updated_at',
            ],
        ]) ?>
        </div>
    </div>    
</div>
